package com.bwstudio.common.autoidempotent.controller;

import com.bwstudio.common.autoidempotent.service.TokenService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author buwei
 */
@RestController
public class AutoIdempotentTokenController {

    @Resource
    private TokenService tokenService;

    @GetMapping("/auto-idempotent/token")
    public String getToken(){
        return tokenService.createToken();
    }
}
